Skip to content

fix: restore the SSA inventory applier vk-sandbox consumes - #4

Merged
CMGS merged 1 commit into
masterfrom
fix/restore-ssa-inventory-applier
Aug 12, 2026
Merged

fix: restore the SSA inventory applier vk-sandbox consumes#4
CMGS merged 1 commit into
masterfrom
fix/restore-ssa-inventory-applier

Conversation

@CMGS

@CMGS CMGS commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

87e3263 cut NewSSAInventoryApplier as an unwired constructor. It is unwired in this repo — the consumer is vk-sandbox, whose startInventoryPublisher builds it to publish node inventory:

pub := inventory.NewPublisher(o.nodeName,
    inventory.NewLiveSource(p, lister),
    inventory.NewNodeInfoSource(advertiseAddr, lister),
    scale.NewSSAInventoryApplier(cclient, "vk-sandbox"),   // <- deleted
    o.log.WithName("inventory"))

So vk-sandbox does not compile against sandbox-operator HEAD. It builds today only because its go.mod still pins v0.0.0-20260726160753-0c71cfef8125, which predates the cut.

pkg/scale publishes the whole node-side publisher toolkit — NodeInventory, NodeInventoryGVK, InventoryApplier, NodeLiveSource, NewNodeInventoryPublisher — and this was its only production applier; StaticInventorySource is the in-memory test double. Shipping the toolkit without the applier leaves every out-of-tree publisher hand-rolling SSA against the GVK, which is the drift the type exists to prevent.

Restored verbatim, minus the comment the InventoryApplier godoc already carries, plus TestSSAApplier_UpsertsOneObjectPerNode: publish through a client, assert the object lands under the node name, republish, assert one object carrying the new entries. Mutation-checked — corrupting the applied name fails the test.

Verified: go build ./..., go test ./..., make lint (0 issues on linux and darwin), asl ./... clean on both GOOS; go build ./... in vk-sandbox under the shared go.work passes again.

Follow-up once this lands: bump vk-sandbox's sandbox-operator pseudo-version so its pinned build and the workspace build agree.

The 8/2 cut read NewSSAInventoryApplier as unwired because nothing in this
repo constructs it. vk-sandbox does: it is the only production implementation
of the exported InventoryApplier, and pkg/scale ships the publisher toolkit
node-side publishers build on. Restored with a test that publishes through a
client and asserts one NodeInventory object per node.
@CMGS
CMGS merged commit e89fcfb into master Aug 12, 2026
2 checks passed
@CMGS
CMGS deleted the fix/restore-ssa-inventory-applier branch August 12, 2026 03:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant